package com.hbnu.Pojo;

public class PageModel {

    private int pageIndex = 1;
    private int pageSize = 3;
    private int totalNum;

    public PageModel() {
    }

    public PageModel(int pageIndex, int pageSize, int totalNum) {
        this.pageIndex = pageIndex;
        this.pageSize = pageSize;
        this.totalNum = totalNum;
    }

    public void setPageIndex(int pageIndex) {
        this.pageIndex = pageIndex;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public void setTotalNum(int totalNum) {
        this.totalNum = totalNum;
    }

    public int getPageIndex() {
        return pageIndex;
    }

    public int getPageSize() {
        return pageSize;
    }

    public int getTotalNum() {
        return totalNum;
    }

    public int getStartNum() {
        return (this.getPageIndex() - 1) * this.getPageSize();
    }
}
